//
//  ZZCQuotaCell.m
//  ZZC-Finance
//
//  Created by mac on 2017/5/22.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "ZZCQuotaCell.h"
#import "ZZCQuota.h"

@implementation ZZCQuotaCell

- (void)setQuotaModel:(ZZCQuota *)quotaModel {
    _quotaModel = quotaModel;
//    _isPending = NO;
    //模型传值过来，在这里给属性赋值
    //授权编号
    self.numberLabel.text = [NSString stringWithFormat:@"%03d",[quotaModel.id intValue]];
    //授权用途
    self.useLabel.text = quotaModel.use;
    //授权额度
    self.quotaLabel.text = [NSString stringWithFormat:@"%@U币",quotaModel.money];
    //授权期限
    self.limitLabel.text = [NSString stringWithFormat:@"%@个月",quotaModel.cycle];
    //利率
    self.rateLabel.text = [NSString stringWithFormat:@"%@%@",quotaModel.rate,@"%"];
    //状态/审核中、关闭、
    if ([quotaModel.status intValue]== 1) {
        [self.stateBtn setTitle:@"待审核" forState:0];
        self.refunView.hidden = YES;
//        []
    }else if ([quotaModel.status intValue]== 2) {
        [self.stateBtn setTitle:@"已通过" forState:0];
        self.refunView.hidden = NO;
    }else {
        [self.stateBtn setTitle:@"关闭" forState:0];
        self.refunView.hidden = YES;
    }
}


@end
